package com.itheima.case2.dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

public interface UserRoleMapper {
    //根据user的id删除t_user_role表中的数据
    @Delete("delete from t_user_role where user_id = #{uid}")
    void deleUserRole(@Param("uid") int uid);

    //向t_user_role表中插入数据
    @Insert("insert into t_user_role values(#{uid},#{rid})")
    void addUserIdAndRoleId(@Param("uid") int uid, @Param("rid") int rid);
}
